package com.service.sys.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.entity.sys.SysLog;
import com.mapper.sys.SysLogMapper;
import com.service.sys.SysLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author clay
 * @since 2022-02-15
 */
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {

    @Resource
    private SysLogMapper sysLogMapper;

    @Override
    public List<SysLog> queryAll(SysLog sysLog) {
        return sysLogMapper.selectList(null);

    }

    @Override
    public List<SysLog> queryByParam(SysLog sysLog) {
        QueryWrapper<SysLog> sysLogQueryWrapper = new QueryWrapper<SysLog>().like("operation_type",sysLog.getOperationType());

        return sysLogMapper.selectList(sysLogQueryWrapper);
    }
}
